package com.kotlin.flong.coroutines1

import kotlinx.coroutines.CoroutineName
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking

/**
 * @Author:liangjl
 * @Date: 2020/7/9-19:39
 * @Eamil:jilongliang@sina.com
 * @Description: VM options --> -Dkotlinx.coroutines.debug
 */
fun main() = runBlocking<Unit> {

    //给定一个线程名称,这里的[+号]是CoroutineContext的plus方法
    launch(Dispatchers.Default + CoroutineName("DispatchersDefault")) {
        println("Thread : ${Thread.currentThread().name}")
    }
}